package com.juku2024.juku.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.juku2024.juku.R
import com.juku2024.juku.model.MeListModel
import com.juku2024.juku.tools.AppUtils
import com.juku2024.juku.tools.DisplayUtil
import java.util.*

class MeAdapter(data: ArrayList<MeListModel>) :
    BaseQuickAdapter<MeListModel, BaseViewHolder>(R.layout.item_me_list, data) {

    override fun convert(holder: BaseViewHolder, item: MeListModel) {
        holder.setText(R.id.tvMe, item.name)
            .setBackgroundResource(R.id.ivMe, item.icon)
        if (item.name == "解锁更多" || item.name == AppUtils.getString(R.string.setting)) {
            holder.itemView.setPadding(0,DisplayUtil.dp2px(12f),0, 0)
        } else {
            holder.itemView.setPadding(0,0,0, DisplayUtil.dp2px(1f))
        }
    }

}